package com.yingluo.abacus.cloud.service.web;

import com.yingluo.abacus.cloud.service.web.utils.ServiceWebUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@FeignClient(value = "${spring.application.host-service}",fallback = Hystric.class)
public interface IFeign {
  @RequestMapping(value = ServiceWebUtils.MODULE_SERIVCEPROVIDER + "/hello",method = RequestMethod.GET)
  String execute( );
}

@Component
class Hystric implements IFeign {
 
  public String execute( ) {
      return "sorry,Hystric " ;
  }
}